package com.example.lyl.yuejian.net.api;

import com.example.lyl.yuejian.bean.ClubDetialBean;
import com.example.lyl.yuejian.bean.ClubLvBean;
import com.example.lyl.yuejian.bean.GoodsDetialBean;
import com.example.lyl.yuejian.bean.LoginResultBean;
import com.example.lyl.yuejian.bean.MasterDetialBean;
import com.example.lyl.yuejian.bean.MasterLvBean;
import com.example.lyl.yuejian.bean.MatchDetialBean;
import com.example.lyl.yuejian.bean.MatchLvResult;
import com.example.lyl.yuejian.bean.MatchOrderLvBean;
import com.example.lyl.yuejian.bean.ModifyUserInfoResultBean;
import com.example.lyl.yuejian.bean.OrderListBean;
import com.example.lyl.yuejian.bean.PhotoLvBean;
import com.example.lyl.yuejian.bean.RegisterResultBean;
import com.example.lyl.yuejian.bean.ResultBean;
import com.example.lyl.yuejian.bean.SelectUserInfoBean;
import com.example.lyl.yuejian.bean.ShopLvBean;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by dllo on 18/3/20.
 */

public interface Api {
    @GET("api/login")
    Observable<LoginResultBean> loginRequest(@Query("uname") String uname, @Query("upsw") String upsw);

    @GET("api/adduser")
    Observable<RegisterResultBean> registerRequest(@Query("uname") String uname, @Query("upsw") String upsw, @Query("upsw1") String upsw1);

    @GET("api/allshop")
    Observable<ShopLvBean> shopLvRequest();

    @Multipart
    @POST("api/updateuser")
    Observable<ModifyUserInfoResultBean> modifyUserInfoRequest(@Query("uid") int uid, @Query("usex") String usex, @Query("utel") String utel, @Query("uadress") String uadress, @Part MultipartBody.Part part);

    @GET("api/selectuser")
    Observable<SelectUserInfoBean> selectUserInfo(@Query("uid") int uid);

    @GET("api/shopdetail")
    Observable<GoodsDetialBean> goodsDetialRequest(@Query("uid") int uid, @Query("sid") int sid);

    @GET("api/addcollect")
    Observable<ResultBean> goodsCollectRequest(@Query("uid") int uid, @Query("sid") int sid);

    @GET("api/delcollect")
    Observable<ResultBean> goodsDelCollectRequest(@Query("uid") int uid, @Query("sid") int sid);

    @GET("api/addorder")
    Observable<ResultBean> addOrder(@Query("uid") int uid, @Query("sid") int sid, @Query("count") int count);

    @GET("api/payorder")
    Observable<ResultBean> payOrder(@Query("oid") int oid);

    @GET("api/myorder")
    Observable<OrderListBean> orderListRequest(@Query("uid") int uid);

    @GET("api/allclub")
    Observable<ClubLvBean> clubListRequest();

    @GET("api/clubdetail")
    Observable<ClubDetialBean> clubDetialRequest(@Query("cid") int cid ,@Query("uid") int uid );

    @GET("api/addattention")
    Observable<ResultBean> attationClubRequest(@Query("cid") int cid ,@Query("uid") int uid );

    @GET("api/allgame")
    Observable<MatchLvResult> matchLvRequest ();

    @GET("api/allmaster")
    Observable<MasterLvBean> masterLvRequest ();

    @GET("api/gamedetail")
    Observable<MatchDetialBean> matchDetialRequest (@Query("gid") int gid);

    @GET("api/buytickets")
    Observable<ResultBean> matchAddOrder (@Query("uid") int uid, @Query("gid") int gid, @Query("count") int count);

    @GET("api/paytickets")
    Observable<ResultBean> payMatchOrder (@Query("tid") int tid);

    @GET("api/mytickets")
    Observable<MatchOrderLvBean> myticketsRequest (@Query("uid") int uid);

    @GET("api/masterdetail")
    Observable<MasterDetialBean> masterDetialRequest ( @Query("mid") int mid);

    @GET("api/allphoto")
    Observable<PhotoLvBean> photoListRequest();

    @Multipart
    @POST("api/addphoto")
    Observable<ResultBean> addPhoto (@Query("uid") int uid,@Query("pname") String pname,@Part MultipartBody.Part part);

    @GET("api/myphoto")
    Observable<PhotoLvBean> myPhotoRequest(@Query("uid") int uid) ;

    @GET("api/delphoto")
    Observable<ResultBean> deleteMyPhoto (@Query("pid") int pid);

    @GET("api/addcomment")
    Observable<ResultBean> addPinglun(@Query("pid") int pid,@Query("uid") int uid,@Query("comcontent") String comment);
}
